#pragma once

#include "Graphics/graphics.h"

struct IndexBuffer
{
	//-----------------------------------------------------------------------------
	//  Name : ~IndexBuffer ()
	/// <summary>
	/// 
	/// 
	/// 
	/// </summary>
	//-----------------------------------------------------------------------------
	~IndexBuffer();
	//-----------------------------------------------------------------------------
	//  Name : dispose ()
	/// <summary>
	/// 
	/// 
	/// 
	/// </summary>
	//-----------------------------------------------------------------------------
	void dispose();

	//-----------------------------------------------------------------------------
	//  Name : isValid ()
	/// <summary>
	/// 
	/// 
	/// 
	/// </summary>
	//-----------------------------------------------------------------------------
	bool isValid() const;


	//-----------------------------------------------------------------------------
	//  Name : populate ()
	/// <summary>
	/// 
	/// 
	/// 
	/// </summary>
	//-----------------------------------------------------------------------------
	void populate(const gfx::Memory* _mem, std::uint16_t _flags = BGFX_BUFFER_NONE);

	/// Internal handle
	gfx::IndexBufferHandle handle = { gfx::invalidHandle };
};